<style>
.tab {
	margin-bottom: 0px;
	margin-top: 6px;
}

.tab>li>a {
	line-height: 22px;
	padding-bottom: 2px;
	padding-top: 2px;
}

.tab-content {
	border: 1px solid #E3E3E3;
	border-radius: 0px 0px 4px 4px;
	border-top: none;
	padding: 2px;
}

#goodsQr {
	min-height: 40px;
	width: 80%;
}

#mGoods {
	background-color: #FFFFFF;
	border: 1px solid #E3E3E3;
	border-radius: 4px;
	max-height: 500px;
	min-height: 100px;
	overflow-y: auto;
	padding: 10px;
	width: 97.5%;
}
</style>
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/commons/taglibs.jsp"%>
<ul class="nav nav-tabs tab tBlock">
	<li class="active">
		<a deny="not" class="nFocus" href="#single" data-toggle="tab">
			<i class="icon-tags"></i>
			下级部门库存查询
		</a>
	</li>
</ul>
<div class="tab-content">
	<div class="tab-pane active" id="single">
		<form id="listForm" class="well form-search" action="${ctx}/adoms/goods/departmentStock" method="post">
			<table class="table table-striped table-bordered table-condensed">
				<tr align="center">
					<th>
						下级部门
						<select name="did">
							<c:forEach items="${dlist }" var="d">
								<option value="${d.id }" <c:if test="${did == d.id }">selected</c:if>>${d.name }</option>
							</c:forEach>
						</select>
						商品名称
						<select name="mid" style="width: auto;">
							<option value="0">-全部-</option>
							<c:forEach items="${mList }" var="m">
								<option value="${m.id }">${m.name }</option>
							</c:forEach>
						</select>
						<button class="btn btn-small" onclick="search()" type="button">
							<i class="icon-search"></i>
							搜索
						</button>
					</th>
				</tr>
			</table>
		</form>
		<table class="table table-striped table-bordered table-condensed">
			<thead>
				<tr>
					<th>#</th>
					<th>商品名称</th>
					<th>规格</th>
					<th>总件数</th>
					<th>总数(单位)</th>
				</tr>
			</thead>
			<c:forEach items="${dataList }" var="data" varStatus="i">
				<tr>
					<td>${i.index + 1}</td>
					<td>${data['marchandise'] }</td>
					<td>${data['spcification'] }</td>
					<td class="tBlue">
						<fmt:formatNumber pattern="###,##0.00" value="${data['numOfBox'] }"></fmt:formatNumber>
					</td>
					<td class="tBlue">${data['nums'] } (${data['packageing'] })</td>
				</tr>
			</c:forEach>
			<c:if test="${fn:length(dataList) == 0 }">
				<tr>
					<td align="center" colspan="6">暂无数据....</td>
				</tr>
			</c:if>
		</table>
	</div>
</div>
